<?php // $Header: /cvsroot/tsheet/timesheet.php/reports.php,v 1.5 2005/03/02 22:22:38 stormer Exp $

// Authenticate
require("class.AuthenticationManager.php");
require("class.CommandMenu.php");
if (!$authenticationManager->isLoggedIn() || !$authenticationManager->hasClearance(CLEARANCE_ADMINISTRATOR)) 
{
	Header("Location: login.php?redirect=$_SERVER[PHP_SELF]&clearanceRequired=Administrator");
	exit;
}

// Connect to database.
$dbh         = dbConnect();
$contextUser = strtolower($_SESSION['contextUser']);

//load local vars from superglobals
$uid = isset($_REQUEST['uid']) ? $_REQUEST['uid']: $contextUser;



//define the command menu
include("timesheet_menu.inc");
  
// Set default months
setReportDate($year, $month, $day, $next_week, $prev_week, $next_month, $prev_month, $time, $time_middle_month); 

?>
<html>
    <head>
	    <title>
		    Timesheet.php Reports Page
		</title>
        <?php include ("header.inc"); ?>
    </head>
    <body <?php include ("body.inc"); ?> >
        <?php include ("banner.inc"); ?>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        	<tr>
        		<td width="100%" class="face_padding_cell">
        			<table width="100%" border="0">
        				<tr>
        					<td align="left" nowrap class="outer_table_heading">
        						Reports
        					</td>
        					<td align="left" nowrap class="outer_table_heading">
        					    <?php echo date('F d, Y',$time) ?>
        					</td>
        					<td align="right" nowrap>
        					    <?php printPrevNext($time, $next_week, $prev_week, $next_month, $prev_month, $time_middle_month,$uid); ?>
        					</td>
        				</tr>
        			</table> 
        	        <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" class="outer_table">
        	        	<tr>
        	        		<td>
        	        			<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_body">
        	        				<tr class="inner_table_head">
        	        					<td class="inner_table_column_heading">Report Description</td>
        	        					<td class="inner_table_column_heading">Actions</td>
        	        				</tr>				
        	        				<tr>
        	        					<td class="calendar_cell_middle">All projects and tasks by manager</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="admin_report_all_projects_and_tasks.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=monthly">Generate </a>
        	        					</td>
        	        				<tr>
									<tr>
        	        					<td class="calendar_cell_middle">Days worked by a specific user</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="admin_report_specific_user.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=monthly">Generate monthly</a> /
        	        						<a href="admin_report_specific_user.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=weekly">Generate weekly</a>
        	        					</td>
        	        				<tr>
        	        				<tr>
        	        					<td class="calendar_cell_middle">Days worked on specific project</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="admin_report_specific_project.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=monthly">Generate monthly</a> /
        	        						<a href="admin_report_specific_project.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=weekly">Generate weekly</a>
        	        					</td>
        	        				</tr>
        	        				<tr>
        	        					<td class="calendar_cell_middle">Days worked for a specific client</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="admin_report_specific_client.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=monthly">Generate monthly</a> /
        	        						<a href="admin_report_specific_client.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=weekly">Generate weekly</a>
        	        					</td>
        	        				</tr>
        	        				<tr>
        	        					<td class="calendar_cell_middle">Days worked by all users on all projects</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="admin_report_all.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=monthly">Generate monthly</a>
        	        					</td>
        	        				</tr>
									<tr>
        	        					<td class="calendar_cell_middle">Monthly imputation state by CTO</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="monthly_imputation_state.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=monthly">Generate monthly</a>
        	        					</td>
        	        				</tr>
        	        				<tr>
        	        					<td class="calendar_cell_middle">Days worked by all users on all projects funded by CIR</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="admin_report_cir.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=monthly">Generate monthly</a> /
											<a href="admin_report_cir.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=weekly">Generate weekly</a>
        	        					</td>
        	        				</tr>		
                                    <tr>
        	        					<td class="calendar_cell_middle">Days worked for a specific source project</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="admin_report_specific_source_project.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=monthly">Generate monthly</a> /
											<a href="admin_report_specific_source_project.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=weekly">Generate weekly</a>
        	        					</td>
        	        				</tr>
                                    <tr>
        	        					<td class="calendar_cell_middle">Days worked for a specific target project</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="admin_report_specific_target_project.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=monthly">Generate monthly</a> /
											<a href="admin_report_specific_target_project.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=weekly">Generate weekly</a>
        	        					</td>
        	        				</tr>
                                    <tr>
        	        					<td class="calendar_cell_middle">Annual state R&D</td>
        	        					<td class="calendar_cell_disabled_right">
        	        						<a href="admin_report_annual_state_R_and_D.php?month=<?php print $month; ?>&year=<?php print $year; ?>&mode=yearly">Generate yearly</a>
        	        					</td>
        	        				</tr>																		
        	        			</table>
        	        		</td>
        	        	</tr>
        	        </table>
        		</td>
        	</tr>
        </table>	
        <?php include ("footer.inc"); ?>
    </BODY>
</HTML>
